home *** CD-ROM | disk | FTP | other *** search
/ Clinical Endocrinology / Clinical Endocrinology.iso / pc / 00000000 / 21000000 / 21030000 / 21030000.dir / 00029_Script_29 < prev    next >
Text File  |  1995-11-09  |  756b  |  24 lines

  1. -- Script to stick the caption to the mouse cursor
  2. -- whilst at the same time hiding the cursor. As the
  3. -- caption is QuickDraw text, its registration point
  4. -- is offset to the top left. This script compensates
  5. -- for that by calculating the relative difference
  6. -- between reg point and mouse grabbing point.
  7.  
  8. on mouseDown
  9.   cursor 200
  10.   put the clickOn into whichSprite
  11.   puppetSprite whichSprite, true
  12.   
  13.   put the locH of sprite whichSprite - the mouseH into Hdiff
  14.   put the locV of sprite whichSprite - the mouseV into Vdiff
  15.   repeat while the stillDown
  16.     set the locH of sprite whichSprite to the mouseH + Hdiff
  17.     set the locV of sprite whichSprite to the mouseV + Vdiff
  18.     updateStage
  19.   end repeat
  20.   
  21.   
  22.   cursor -1
  23.   
  24. end